<?php
class ConnectionFactory {
	
	private $dbType = 'mysql';
	private $host = 'localhost';
	private $user = 'root';
	private $pass = '';
	private $dbName = '1144013_estac';
	
	public function getConnection() {
		$conn = null;
		try {
			$conn = new PDO(
				$this->dbType . ':host=' . $this->host .';dbname=' . $this->dbName, 
				$this->user, 
				$this->pass
                                
			);
                       
		}
		catch(PDOException $e) {
			echo 'DB Error: ' . $e->getMessage();
		}
		return $conn;
	}
}
?>